package com.zzw.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

@Component
public class RedisProducer {

    @Autowired
    private JedisPool pool;

    public void producer(){
        Jedis jedis = pool.getResource();
        jedis.rpush("test","1","2","3");
        jedis.close();
    }

}
